import { get, post } from '@/utils/request'

/**
 * 接口授权
 * @param {Object} data 授权参数信息
 */
export const authorize = data => post('/authorize', data, true)

/**
 * 图片上传接口
 * @param {*} data
 */
export const uploadFile = function(data) {
  return post('/attachs/upload', data, true)
}

/**
 * 发送短信验证码接口
 * @param {*} data
 */
export const sendSmsCode = function(data) {
  return post('/sms/captcha', data, true)
}

/**
 * 获取商品订单详情
 */
export const agreement = data => {
  return get(`/site/agreement`, data)
}
